package com.joysuch.wwyt.monitoringcenter.controller;

import com.joysuch.wwyt.core.common.ajax.ResultBean;
import com.joysuch.wwyt.monitoringcenter.bean.AlarmCenterQueryBean;
import com.joysuch.wwyt.monitoringcenter.service.AlarmCenterService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.util.Map;

@RestController
@RequestMapping("/monitoring-point-statistics")
@RequiredArgsConstructor
public class MonitoringPointStatisticsController {

    private final AlarmCenterService alarmCenterService;

    @GetMapping("alarm-trend")
    public Map<String, Object> alarmTrend(String startTime, String endTime) {
        return alarmCenterService.alarmTrendStatistics(startTime, endTime);
    }

}
